home *** CD-ROM | disk | FTP | other *** search
/ Hottest 6 / Hottest 6 (1996)(PDSoft)[!].iso / software / videoutils / a-g / ami2d / test / srm2.rexx < prev    next >
OS/2 REXX Batch file  |  1978-11-24  |  1KB  |  76 lines

  1. /* simple solid rocket motor */
  2. options results
  3.  
  4. if ~show('ports', "AMI2D") then do
  5.     address command 'run ami2d:bin/ami2d'
  6.     do while ~show('ports', "AMI2D")
  7.     end
  8. end
  9.  
  10. address ami2d
  11.  
  12. call 'ami2d:rexx/axisym'
  13.  
  14. if ~show('l', "rexxmathlib.library") then do
  15.     check = addlib('rexxmathlib.library',0,-30,0)
  16. end
  17.  
  18. nn = 16
  19. mn = 8
  20. ne = nn/2 - 1
  21. me = mn/2 - 1
  22. b = 6.0
  23. a = 1.0
  24. h = 0.05
  25. L = 10.0
  26. E = 1500.0
  27. nu = 0.4900
  28. Ec = 10.0e6
  29. nuc = 0.3000
  30. P = -1000.0
  31.  
  32. 'reset'
  33. 'iso(1,'E','nu')'
  34. 'iso(2,'Ec','nuc')'
  35. g = 1.5
  36. do i=0 to nn
  37.     do j=0 to mn
  38.         k = i*40 + j + 1
  39.         r = a + (b-a)*pow(i/nn,g)
  40.         z = -L*pow(j/mn,g);
  41.         'node('k','r','z')'
  42.     end
  43. end
  44. do i=1 to 2
  45.     do j=0 to mn
  46.         k = (nn + i)*40 + j + 1
  47.         r = b + i*h/2
  48.         z = -L*pow(j/mn,g);
  49.         'node('k','r','z')'
  50.     end
  51. end
  52. do i=0 to ne
  53.     do j=0 to me
  54.         k = i*20 + j + 1
  55.         n = i*80 + j*2 + 1
  56.         'quad8('k',1,'n','n + 2','n + 82','n + 80','n + 1','n + 42','n + 81','n + 40')'
  57.     end
  58. end
  59. i = ne + 1
  60. do j=0 to me
  61.     k = i*20 + j + 1
  62.     n = i*80 + j*2 + 1
  63.     'quad8('k',2,'n','n + 2','n + 82','n + 80','n + 1','n + 42','n + 81','n + 40')'
  64. end
  65. do i=0 to (nn + 2)
  66.     'dispz('i*40 + 1',0.0)'
  67. end
  68. do i=0 to me
  69.     'press('i + 1',1,'P')'
  70. end
  71. j = me + 1
  72. do i=0 to (ne + 1)
  73.     'press('i*20 + j',2,'P')'
  74. end
  75. exit
  76.